<?php

namespace App\Http\Controllers\UserApi;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\Api\ClassService;
use App\Http\Requests\UserApi\ClassController\ListsWhere;
use App\Http\Requests\UserApi\ClassController\ClassHomeInfo;

class ClassController extends BaseController
{
    //首页课程列表
    public function class_home(Request $request)
    {
        return self::success(ClassService::class_home_lists($request));
    }

    //课程详情
    public function class_home_info(ClassHomeInfo $request)
    {
        return self::success(ClassService::class_home_info($request));
    }

    //课程安排
    public function class_base_info(Request $request)
    {
        return self::success(ClassService::class_base_info($request));
    }

    public function lists_where(ListsWhere $request)
    {
        return self::success(ClassService::where($request->type));
    }
}
